class BinarySearchTree {
    constructor () {
        this.root = null
    }
    insert(key){
        let node = new Node(key)
        if(this.root){

        } else {
            this.root = node
        }
    }
    insertNode(node, newNode){
        if(newNode.key <= node.key){
            if (node.left==null){
                node.left = newNode
            } else {
                this.insertNode(node.left, newNode)
            }
        } else {
            if(node.right==null){
                node.right = newNode
            } else {
                this.insertNode(node.right, newNode)
            }
        }
    }
    search(key){

    }
    inOrderTraverse(){

    }
    preOrderTraverse(){

    }
    postOrderTraverse(){

    }
    min(){

    }
    max(){

    }
    remove(key){

    }
}

class Node{
    constructor (key) {
        this.key = key
        this.left = null
        this.right = null
    }
}

export default BinarySearchTree
